<html>

<script>
    window.onload = function () {
        let ws = new WebSocket('ws://45.77.70.80:23460');
        ws.onopen = function () {
            ws.send('{"mode":"say","order_id":"375"}');
        };
        ws.onmessage = function (e) {
            console.log('from server: ' + e.data);
        };

        setInterval(function () {
            ws.send('{"mode":"heart"}');
        }, 2000)

    }
</script>

</html>

